<template>
  <div class="search">
    <div class="search-input">
      <img class="searchImg" src="../assets/img/search.png" alt="搜索">
      <input disabled="isDisabled" type="text" placeholder="搜索你感兴趣的日记和用户">
    </div>
    <div class="notice">
      <img src="../assets/img//notice.png" alt="">
      <span class="noticeNum">{{noticeNum}}</span>
    </div>
  </div>
</template>

<script>
    export default {
        name: "search",
      data() {
        return {
          noticeNum: 2,
          isDisabled: false
        }
      }
    }
</script>

<style scoped>
  .search {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding:0 .3rem;
    background: #fff;
    padding-bottom: .1rem;
  }
  .search-input {
    flex: 1;
    display: flex;
    box-sizing: border-box;
    padding: .1rem .2rem;
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    border-radius: 50px;
    background: #f1f1f1;
  }
  .search-input >input {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    padding-left: .3rem;
    outline: none;
    font-size: 15px;
  }
  .searchImg {
    width: 23px;
    height: 23px;
  }

  .notice {
    width: 40px;
    height: 40px;
    position: relative;
  }
  .notice>img{
    width: 100%;
    height: 100%;
    display: block;
  }
  .noticeNum{
    position: absolute;
    top: 0;
    right: 0;
    box-sizing: border-box;
    padding:.05rem .1rem;
    background: #e55583;
    border-radius: 50px;
    font-size: 12px;
    color: #fff;
  }
</style>
